/* eslint-disable import/no-duplicates */
import request from '@/uilts/request'
// 工单统计
export const CollectWorkOrderStatusStatisticsRequest = ({ collectType, start, end }) => {
  return request({
    url: `/api/task-service/task/collectReport/${start}/${end}`
  })
}
// 订单总数
export const TotalNumberOrdersRequest = ({ start, end }) => {
  return request({
    url: '/api/order-service/report/orderCount',
    params: {
      start: `${start} 00:00:00`,
      end: `${end} 23:59:59`
    }
  })
}
// 销售统计
export const SalesStatisticsRequest = ({ collectType, start, end }) => {
  return request({
    url: `/api/order-service/report/amountCollect/${collectType}/${start}/${end}`
  })
}
// 销售额
export const SalesRequest = ({ start, end }) => {
  return request({
    url: '/api/order-service/report/orderAmount',
    params: {
      start: `${start} 00:00:00`,
      end: `${end} 23:59:59`
    }
  })
}
// 热销商品
export const HotSellingGoodsRequest = ({ topValue, start, end }) => {
  return request({
    url: `/api/order-service/report/skuTop/${topValue}/${start}/${end}`
  })
}
// 合作商点位数TOP5
export const PartnersRequest = () => {
  return request({
    url: '/api/vm-service/node/nodeCollect'
  })
}
// 点位总数
export const TotalNumberPointsRequest = () => {
  return request({
    url: '/api/vm-service/node/count'
  })
}
// 合作商家总数
export const MerchantsRequest = () => {
  return request({
    url: '/api/user-service/partner/count'
  })
}
// 销售量分布
export const DistributionSalesRequest = ({ start, end }) => {
  console.log(start, end)
  return request({
    url: `/api/order-service/report/regionCollect/${start}/${end}`
  })
}
